﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;

namespace WPF.Element.UI.CustomControls
{
    public class ElRadio: RadioButton
    {
        static ElRadio()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(ElRadio), new FrameworkPropertyMetadata(typeof(ElRadio)));
        }

        /// <summary>
        /// 圆角
        /// </summary>
        public static readonly DependencyProperty ElCornerRadiusProperty =
            DependencyProperty.Register("ElCornerRadius", typeof(CornerRadius), typeof(ElRadio));   // new PropertyMetadata(0, null)

   /*     public static readonly DependencyProperty ElCornerRadiusProperty =
    DependencyProperty.Register("ElCornerRadius", typeof(CornerRadius), typeof(ElButton));   // new PropertyMetadata(0, null)*/

        /// <summary>
        /// 圆角 设置这个属性可以直接设置圆角
        /// </summary>
        public CornerRadius ElCornerRadius
        {
            get
            {
                return (CornerRadius)GetValue(ElCornerRadiusProperty);
            }
            set
            {
                SetValue(ElCornerRadiusProperty, value);
            }
        }


        /// <summary>
        /// 前面圆圈的高度和宽度
        /// 圆圈的高度和宽度 一致所以只是设置一个值
        /// </summary>
        public static readonly DependencyProperty ElRadioHeightAndWidthProperty =
            DependencyProperty.Register("ElRadioHeightAndWidth", typeof(double), typeof(ElRadio));   // new PropertyMetadata(0, null)

        /// <summary>
        /// 圆圈的高度和宽度
        /// </summary>
        public double ElRadioHeightAndWidth
        {
            get
            {
                return (double)GetValue(ElRadioHeightAndWidthProperty);
            }
            set
            {
                SetValue(ElRadioHeightAndWidthProperty, value);
            }
        }



        /// <summary>
        /// 选中的前景色
        /// </summary>
        public static readonly DependencyProperty CheckForegroundProperty =
            DependencyProperty.Register("CheckForeground", typeof(Brush), typeof(ElRadio));   // new PropertyMetadata(0, null)

        /// <summary>
        /// 选中的前景色
        /// </summary>
        public Brush CheckForeground
        {
            get
            {
                return (Brush)GetValue(CheckForegroundProperty);
            }
            set
            {
                SetValue(CheckForegroundProperty, value);
            }
        }


        /// <summary>
        /// 选中的背景色
        /// </summary>
        public static readonly DependencyProperty CheckBackgroundProperty =
            DependencyProperty.Register("CheckBackground", typeof(Brush), typeof(ElRadio));   // new PropertyMetadata(0, null)

        /// <summary>
        /// 选中的背景色
        /// </summary>
        public Brush CheckBackground
        {
            get
            {
                return (Brush)GetValue(CheckBackgroundProperty);
            }
            set
            {
                SetValue(CheckBackgroundProperty, value);
            }
        }


        /// <summary>
        /// 选中的背景色
        /// </summary>
        public static readonly DependencyProperty CheckBorderBrushProperty =
            DependencyProperty.Register("CheckBorderBrush", typeof(Brush), typeof(ElRadio));   // new PropertyMetadata(0, null)

        /// <summary>
        /// 选中的背景色
        /// </summary>
        public Brush CheckBorderBrush
        {
            get
            {
                return (Brush)GetValue(CheckBorderBrushProperty);
            }
            set
            {
                SetValue(CheckBorderBrushProperty, value);
            }
        }

        




    }
}
